package com.by.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import java.io.Serializable;
import java.util.List;

import lombok.Data;
import lombok.Getter;
import lombok.Setter;

/**
 * <p>
 * 商品三级分类
 * </p>
 *
 * @author 黄佳辉
 * @since 2023-01-04
 */
@Data
public class Category implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 分类id
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 分类名称
     */
    private String name;

    /**
     * 图标地址
     */
    private String picture;

    /**
     * 排序
     */
    private Integer sorts;

    /**
     * 父分类id
     */
    private Long parentId;

    @TableField(exist = false)
    private List<Category> childNodes;
}
